package cn.tedu.tmall.common.pojo.po;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@Document(indexName = "mall_goods")
public class GoodsSearchPO implements Serializable {
    /**
     * 数据ID
     */
    @Id
    private Long id;
    /**
     * 标题
     */
    @Field(type = FieldType.Text , analyzer = "ik_smart")
    private String title;
    /**
     * 摘要
     */
    @Field(type = FieldType.Text , analyzer = "ik_smart")
    private String brief;
    /**
     * 关键词列表
     */
    @Field(type = FieldType.Text , analyzer = "ik_smart")
    private String keywords;
    /**
     * 价格
     */
    private BigDecimal salePrice;
    /**
     * 封面图
     */
    @Field(type = FieldType.Keyword)
    private String coverUrl;
    /**
     * 上架状态
     */
    private Integer isPutOn;
}
